using System;
using PetShop.Infrastructure.Exceptions;

namespace PetShop.Domain.Model
{

	
	
	
	[Serializable]
	public class AddressInfo {

		
		private string _FirstName;
		private string _LastName;
		private string _Address1;
		private string _Address2;
		private string _City;
		private string _State;
		private string _Zip;
		private string _Country;
		private string _Phone;

		
		
		
		public AddressInfo(){
		}

			
		public AddressInfo(string firstName, string lastName, string address1, string address2, string city, string state, string zip, string country, string phone) {
			this._FirstName = firstName;
			this._LastName = lastName;
			this._Address1 = address1;
			this._Address2 = address2;
			this._City = city;
			this._State = state;
			this._Zip = zip;
			this._Country = country;
			this._Phone = phone;
		}

		
		public string FirstName {
			get { return _FirstName; }
			set {

				if (value == null)
				{
					throw new BusinessException("FirstNameRequired", "FirstName must not be null.");
				}
				_FirstName = value;
			}
		}

		public string LastName {
			get { return _LastName; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("LastNameRequired", "LastName must not be null.");
				}
				_LastName = value;
			}
		}

		public  string Address1 {
			get { return _Address1; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("Addr1Required", "Addr1 must not be null.");
				}
				_Address1 = value;
			}
		}

		public string Address2 {
			get { return _Address2; }
			set { _Address2 = value; }
		}

		public string City {
			get { return _City; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("CityRequired", "City must not be null.");
				}
				_City = value;
			}
		}

		public string State {
			get { return _State; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("StateRequired", "State must not be null.");
				}
				_State = value;
			}
		}

		public string Zip {
			get { return _Zip; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("ZipRequired", "Zip must not be null.");
				}
				_Zip = value;
			}
		}

		public string Country {
			get { return _Country; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("CountryRequired", "Country must not be null.");
				}
				_Country = value;
			}
		}

		public string Phone {
			get { return _Phone; }
			set
			{
				if (value == null)
				{
					throw new BusinessException("PhoneRequired", "Phone must not be null.");
				}
				_Phone = value;
			}
		}
	}
}